package com.zhibang.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zhibang.entity.DictData;
import com.zhibang.service.DictDataService;
import com.zhibang.mapper.DictDataMapper;
import org.springframework.stereotype.Service;

/**
* @author lewin
* @description 针对表【dict_data】的数据库操作Service实现
* @createDate 2025-03-05 09:18:15
*/
@Service
public class DictDataServiceImpl extends ServiceImpl<DictDataMapper, DictData>
    implements DictDataService{

    @Override
    public String getLabelByCode(String code, Object value) {
        QueryWrapper<DictData> qw = new QueryWrapper<>();
        qw.eq("dict_code",code);
        qw.eq("dict_value",value);
        DictData data = getOne(qw);
        return data.getDictLabel();
    }
}




